var pre = 0;
var dif = 0;
var count = 0;
var re = /<a(.*)/;
$('h4').each(function(i,h4){
var d = new Date($.trim(h4.innerHTML.replace(re,'')).replace(/-/g,'/'));
if(pre == 0){
pre = d.getTime();
}
else{
count++;
var g = d.getTime()-pre;
console.log(g);
dif += g;
pre = d.getTime();
}
})
var result = dif / count;
console.log(count + ' : ' + result)